# Maintainer: Bruno Pagani <archange@archlinux.org>
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=igsc
pkgver=0.8.9
pkgrel=2
pkgdesc="Intel graphics system controller firmware update library"
arch=(loong64 x86_64)
url="https://github.com/intel/igsc/"
license=(Apache)
depends=(intel-metee systemd-libs)
makedepends=(cmake systemd)
source=(${url}/archive/V${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('63f7f240e69d6e19b89948f7eaa6f25c9003f374ebbf40c4213b6bc7fed47d8e')

build() {
  cmake -B build -S ${pkgname}-${pkgver} \
    -G 'Unix Makefiles' \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_WERROR=OFF \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
}
